<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <title>登录页面</title>

    <link href="css/bootstrap.min.css" rel="stylesheet">
    <link href="css/login.css" rel="stylesheet">
    <script src="js/jquery.js"></script>
    <script src="js/bootstrap.js"></script>
</head>
<body>

    <div class="container text-center">
        <form class="form-signin" action="/loginServlet">
            <h2 class="form-signin-heading">登录页面</h2>
            <input type="text"  name="username" class="form-control" placeholder="用户名" required autofocus>
            <input type="password"  name="password" class="form-control" placeholder="密码" required>
            <input type="text" name="code" class="form-control" placeholder="验证码">
            <!--页面一加载就向checkCodeServlet发送请求-->
            <img src="/checkCodeServlet" alt="验证码" style="cursor: pointer" onclick="f(this)"><br>
            <button class="btn btn-lg btn-primary btn-block" type="submit">登录</button>
        </form>
    </div>
    <script>
        function f(imgObj) {
            imgObj.src = "/checkCodeServlet?" + new Date().getTime();
        }
    </script>

</body>
</html>
